<template>
  <div>
    <district-selection />
    <pagination :total="5" />
    11111111111111
    <el-button @click="testFn" />
    <el-button @click="testFn2">222</el-button>
    <el-button @click="testFn3">333</el-button>
    <el-divider />
    <TestComp show />
    <el-divider />
    <TestToolbar ref="toolbar" show-agent />
    <el-button @click="testFn4">444</el-button>
  </div>
</template>
<script>
import pagination from '@/components/pagination'
import districtSelection from '@/components/districtSelection'
import TestComp from './components/TestComp.vue'
import TestToolbar from './components/TestToolbar.vue'
export default {
  components: {
    TestComp,
    TestToolbar,
    districtSelection,
    pagination
  },
  methods: {
    async testFn() {
      const obj = {
        name: 'objobj',
        data: {
          one: 1,
          two: 2,
          three: 3
        }
      }
      function getObj() {
        return obj
      }

      const { data: fff } = await getObj()
      console.log('fff:', fff)
    },
    testFn2() {
      const ooobj = {
        one: {
          name: 'one',
          value: 1
        },
        two: {
          name: 'two',
          value: 2
        },
        three: 3
      }
      let obbbj = {}
      obbbj = {
        ...ooobj
        // one: one.value,
        // two: two.value
      }
      console.log(obbbj)
    },
    testFn3() {
      const ff = 0
      if ((ff ?? '') !== -1) {
        console.log('333')
      }
    },
    testFn4() {
      this.$alert(this.$refs.toolbar.categoryFilter)
    }
  }
}
</script>
<style lang="">

</style>
